package com.edu.cdp.service;

import com.edu.cdp.DTO.PageDTO;
import com.edu.cdp.DTO.UpdateUserDTO;
import com.edu.cdp.DTO.UserDTO;
import com.edu.cdp.VO.BalanceVO;
import com.edu.cdp.common.PageResult;
import com.edu.cdp.domain.User;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
* @author Yang Can
* @description 针对表【user】的数据库操作Service
* @createDate 2024-05-31 11:27:57
*/
public interface UserService extends IService<User> {

    User login(String username, String password);

    User register(UserDTO user);

   List<User> getUserByName(String userName);

    List<User> listBySex(String sex);

    PageResult pageQuery(PageDTO pageDTO);

    User newUpdate(UpdateUserDTO user);

    User updateAvatar(Integer id, MultipartFile avatar);

    BalanceVO getBalance(Integer id);

    BalanceVO recharge(Integer id, Double money);

    User consume(Integer id, Double money);
}
